package com.bridgeintelligent.tag.engine.mvc;

import com.bridgeintelligent.tag.engine.api.IndexModel;
import com.bridgeintelligent.tag.engine.api.QueryModel;
import com.bridgeintelligent.tag.engine.api.rsp.*;

import java.io.IOException;

/**
 * Created by JackCheung on 2019/9/24 5:07 PM.
 */
public interface IEngineQueryService {

    String INDEX_NAME_FORMAT = "%s_%s";

    /**
     * 数据集查询
     *
     * @param queryModel
     * @return
     */
    DataSetRsp dataSet(QueryModel queryModel);

    /**
     * 聚合分析
     *
     * @param indexQueryModel
     * @return
     */
    IndexRsp index(IndexModel indexQueryModel);


    /**
     * 客群分析
     *
     * @param queryModel
     * @return
     */
    CustomerGroupRsp customerGroup(QueryModel queryModel) throws IOException;

    /**
     * 微观画像
     *
     * @param filterName
     * @param filterValue
     * @return
     */
    MicroPortraitRsp microPortrait(String filterName, String filterValue);

    /**
     * 获取索引下的mapping字段集合
     * @param indexName
     * @return
     */
    MappingRsp getIndexMapping(String indexName);
}
